package com.dxy.df.modules.service.impl;

import com.dxy.df.constants.ConstStrings;
import com.dxy.df.utils.UcBeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.dxy.df.modules.bean.entity.DfCommentEntity;
import com.dxy.df.modules.bean.vo.DfCommentVo;
import com.dxy.df.modules.bean.query.DfCommentQuery;
import com.dxy.df.modules.bean.put.DfCommentPut;
import com.dxy.df.modules.dao.DfCommentMapper;
import com.dxy.df.modules.service.DfCommentService;


/**
 * @author biz@dxy.cn
 * @describe 评论表
 * @date 2019-10-25 16:23:46
 */
@Service
public class DfCommentServiceImpl implements DfCommentService {

	@Autowired
	private DfCommentMapper dfCommentMapper;
	
	@Override
	public DfCommentEntity queryObject(DfCommentQuery query){
		return dfCommentMapper.queryObject(query);
	}
	
	@Override
	public List<DfCommentVo> queryList(DfCommentQuery query){
		return dfCommentMapper.queryList(query);
	}
	
	@Override
	public int queryTotal(DfCommentQuery query){
		return dfCommentMapper.queryTotal(query);
	}
	
	@Override
	public void save(DfCommentPut put){
		DfCommentEntity entity = UcBeanUtils.copyPropertiesForDDL(put, DfCommentEntity.class, ConstStrings.ADD);
		dfCommentMapper.save(entity);
	}
	
	@Override
	public void update(DfCommentPut put){
		DfCommentEntity entity = UcBeanUtils.copyPropertiesForDDL(put, DfCommentEntity.class, "");
		dfCommentMapper.update(entity);
	}
	
	@Override
	public void delete(Integer id){
		dfCommentMapper.delete(id);
	}

	@Override
    public int deleteBatch(Integer[] ids){
		return dfCommentMapper.deleteBatch(ids);
	}

}
